package com.hd.batch.quartz.batch.job.processor;

import com.hd.batch.quartz.batch.job.pojo.User;
import org.springframework.batch.item.ItemProcessor;

/**
 * <h3>partitionjob</h3>
 * <p>UserItemProcessor</p>
 *
 * @author : hduong
 * @version : 1.0
 * @date : 2020-09-07 18:00
 **/
public class UserItemProcessor implements ItemProcessor<User, User> {

    @Override
    public User process(User item) throws Exception {
        if (Integer.parseInt(item.getAge()) % 2 == 0) {
            return item;
        }
        return null;
    }
}
